package com.iplatform.file.function.meta.domain;

import com.iplatform.module.annotation.KeyId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author Dair
 * @since 元数据表
 */

@ApiModel(description = "元数据表")
@Data
public class PsMetaData implements Serializable {
	/**
	 * 元数据记录id
	 */
	@ApiModelProperty(value = "元数据记录id")
	@KeyId
	private Long  psMetaDataId;
	
	
	@ApiModelProperty(value = "元数据目录id")
//	@NotNull(message = "元数据目录id不能为空")
	private Long fkMetaDataDirId;

	@ApiModelProperty(value = "元数据类型")
	private String id;
	/**
	 * 元数据名称
	 */
	@ApiModelProperty(value = "元数据名称")
	@NotEmpty(message = "元数据名称不能为空")
	private String metaName;
	
	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	@NotNull
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	
	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "数据字段id")
	private Long parentId;


	private static final long serialVersionUID = 1L;

	@Override
	public String toString() {
		return "PsMetaData{" +
				"psMetaDataId=" + psMetaDataId +
				", fkMetaDataDirId=" + fkMetaDataDirId +
				", id='" + id + '\'' +
				", metaName='" + metaName + '\'' +
				", createTime=" + createTime +
				", updateTime=" + updateTime +
				", parent_id=" + parentId +
				'}';
	}
}